import { fetchGet, fetchPost, fetchFile } from "../utils/http.js";

/**
 * 获取something
 */
// 获取认证信息
export const fnGetRzData = (param) => {
    return fetchGet("User/realauth", param);
};

// 获取个人信息
export const fnGetUserData = (param) => {
    return fetchGet("User/userEdit", param);
};

// 修改个人信息
export const fnGetEditUser = (param) => {
    return fetchPost("User/userEdit", param);
};

// 修改认证
export const fnEditRz = (param) => {
    return fetchPost("User/realauth", param);
};

export const realauthEdit = (param) => {
    return fetchPost("User/realauthEdit", param);
}

// 买号列表
export const fnGetAccountList = (param) => {
    return fetchPost("User/buynum", param);
};

// 查看买号
export const fnCheckUser = (param) => {
    return fetchPost("User/buynumlook", param);
}

// 删除买号
export const fnDelUser = (param) => {
    return fetchPost("User/buynumDel", param)
}

// 分类
export const fnGetCate = () => {
    return fetchPost("Index/category", {})
}

// 添加买号
export const fnAddAccount = (file) => {
    return fetchFile("User/buynumAdd", file)
}

// 修改买号
export const fnEditAccount = (file) => {
    return fetchFile("User/buynumEdit", file)
}

// 查看修改买号
export const fnCheckEditAccount = (param) => {
    return fetchGet("User/buynumEdit", param)
}

// 被投诉
export const fnGetTsData = (param) => {
    return fetchPost('User/report', param)
}

// 推荐有奖
export const fnAddRecommend = (file) => {
    return fetchFile("User/meradd", file)
}

// 推荐有奖记录
export const fnGetRecommend = (param) => {
    return fetchPost("User/merlist", param)
}

// 订单差价列表
export const fnGetFall = (param) => {
    return fetchPost("User/bclist", param)
}

export const updateFall = (param) => {
    return fetchPost("User/bcupdate", param)
}

export const fnAddFall = (file) => {
    return fetchFile("User/bcadd", file)
}

// 绑定支付宝
export const getAlipay = (param) => {
    return fetchGet('User/bindAlipay', param)
}

export const postAlipay = (param) => {
    return fetchPost('User/bindAlipay', param)
}

// 绑定手机号

export const bindPhone = (param) => {
    return fetchPost('User/bindMobile', param)
}

export const getBindPhone = (param) => {
    return fetchGet('User/bindMobile', param)
}

// 绑定银行卡
export const getBank = (param) => {
    return fetchGet('User/bankcard', param)
}

export const postBank = (param) => {
    return fetchPost('User/bankcard', param)
}

// 查看打款详情
export const getPayDetail = (param) => {
    return fetchPost('Goods/order17', param)
}


export default {
    fnGetRzData,
    fnGetUserData,
    fnGetEditUser,
    fnEditRz,
    fnGetAccountList,
    fnCheckUser,
    fnDelUser,
    fnGetCate,
    fnAddAccount,
    fnEditAccount,
    fnCheckEditAccount,
    fnGetTsData,
    realauthEdit,
    fnAddRecommend,
    fnGetRecommend,
    fnGetFall,
    updateFall,
    fnAddFall,
    getAlipay,
    postAlipay,
    bindPhone,
    getBindPhone,
    getBank,
    postBank,
    getPayDetail
}